-
-
Notifications
You must be signed in to change notification settings - Fork 19
Qt6 (QGIS 4) compatibility #1036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@gacarrillor Do you think we could ignore that java and network is not working with the flatpak? Btw. I receive this message on starting it |
Qt.DockWidgetArea( | ||
settings.value( | ||
"QgisModelBaker/validate_dock/area", | ||
2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like Qt.DockWidgetArea.RightDockWidgetArea
instead of 2
to be more explicit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has a problem with that. Tells me it's not an integer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work on your flatpak instance:
QSettings().value("QgisModelBaker/validate_dock/area", Qt.DockWidgetArea.RightDockWidgetArea, type=int)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm... Have to check that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work on your flatpak instance:
QSettings().value("QgisModelBaker/validate_dock/area", Qt.DockWidgetArea.RightDockWidgetArea, type=int)
TypeError: QgisInterface.addDockWidget(): argument 1 has unexpected type 'int'
And when I do this:
QSettings().value("QgisModelBaker/validate_dock/area", Qt.DockWidgetArea.RightDockWidgetArea, type=Qt.DockWidgetArea),
TypeError: unable to convert a QVariant of type 10 to a QMetaType of type 65858
That's why I decided to read it as integer and cast then...
In Qt6 we could at least take Qt.DockWidgetArea.RightDockWidgetArea.value
instead of 2 but this would not work with Qt5... 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@signedav, I think we forgot this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but I forgot to submit my review comments. See above...
@signedav, if the flatpak build is not letting us fully test MB, I guess we could try these changes on a Windows build with support for Qt6. Do you have access to a Windows machine? If not, I could give it a try by the end of this week. |
This would be great. |
Before that, I'd appreciate if you can upload a zipped dev version of the plugin somewhere. |
Off today. I'll do it tomorrow. |
docker run -it --rm -v /home/dave/dev/opengisch/QgisModelBaker:/home/pyqgisdev/ registry.gitlab.com/oslandia/qgis/pyqgis-4-checker/pyqgis-qt-checker:latest pyqt5_to_pyqt6.py --logfile /home/pyqgisdev/pyqt6_checker.log . For big parts this resolves #985
@gacarrillor Can you test with the zip here #1036 (comment) |
Manual Tests for Qt6 on Windows: WIZARD
Project Generation
ili2db
SCHEMA IMPORT
DATA IMPORT
DATA EXPORT
VALIDATOR
BASKETS/DATASETS
QUICK VISUALIZER
|
Cool, thanks for testing. Am I right that the network issue (listing of models and ili2db download) happens on Qt6 only and the others as well on the current QGIS release? If so we should solve the Qt6 in a first step and check the others independently. |
I've experienced the ili2db download issues on Qt5. Actually, I think I'm used to install those libs manually. |
Okay, since the listing of models is reproducible by flatpak I'll check this out. Would you mind to create separate issues for the other problems? Except the thing with ili2db download. I think this is a problem with the server. And we cannot solve it since we are not allowed to ship java code in plugins AFAIK. |
Done at #1041 and #1042. I was unable to reproduce them using a Qt5-build on GNU/Linux. Therefore, I marked them as Qt6-only. |
Minor thing. See #1043 |
Okay, when I merge it and we publish an experimental soonish? |
Qt6 upgrade performed by pyqgis4-checker:
See https://github.com/qgis/QGIS/wiki/Plugin-migration-to-be-compatible-with-Qt5-and-Qt6 and https://github.com/qgis/pyqgis4-checker
Requires opengisch/QgisModelBakerLibrary#144
For big parts this resolves #985
Manual checks
Test manually
Docker approach
and:
and:
with:
but does not work
Flatpack approach
Got flatpack from http://duif.net/qgis-qt6.flatpak
And this works...
Results
Deprecated
FollowREdirectsattribute
mode -> could be skipped when Qt6 (but not with Qt5)setFilterRegularExpression replaces setFilterRegExp
The gui is f... up. Sizes are not correct. (Test here on the other computer)was only the case with my weird laptop that as issues anywayCould not test Java interaction with flat pack (it says no java is installed)
I tried to install Java flatpak and pass this
--env=JAVA_HOME=/var/lib/flatpak/runtime/org.freedesktop.Sdk.Extension.openjdk
but made no differenceCould not gather models from repo:
And it says Warning: Qt: Session management error: Could not open network socket
I tried to pass this to the flatpak
--device=all --filesystem=host --share=network
but made no differenceDo we need to support Qt < 5.12? (if so,then we need setFilterRegExp)